package com.assessment.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.staff.entity.Staff;

@Entity
@Table(name="t_complaint_record")
public class ComplaintRecord 
{
	private Long id;
	private AssessmentRecord assessmentRecord;
	private Date appealTime;
	private Staff staff;
	private Staff responsiblePerson;
	private String reason;
	private String content;
	private Integer examine;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@OneToOne(cascade=CascadeType.ALL)
	public AssessmentRecord getAssessmentRecord() {
		return assessmentRecord;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getAppealTime() {
		return appealTime;
	}
	
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getStaff() {
		return staff;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getResponsiblePerson() {
		return responsiblePerson;
	}
	public String getReason() {
		return reason;
	}
	public String getContent() {
		return content;
	}
	public Integer getExamine() {
		return examine;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setAssessmentRecord(AssessmentRecord assessmentRecord) {
		this.assessmentRecord = assessmentRecord;
	}
	public void setAppealTime(Date appealTime) {
		this.appealTime = appealTime;
	}
	public void setStaff(Staff staff) {
		this.staff = staff;
	}
	public void setResponsiblePerson(Staff responsiblePerson) {
		this.responsiblePerson = responsiblePerson;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public void setExamine(Integer examine) {
		this.examine = examine;
	}
		
}
